



<form  class="big"  method="post" id="frontForm" >
 {% csrf_token %}
<div align="center">
    同步方向

      <select name="source_target">
        <option value="192.168.10.132_uat1.chinayie.com"> Test132 -> UAT1 </option>
        <option value="192.168.10.132_uat.chinayie.com"> Test132 -> UAT </option>
        <option value="192.168.10.212_uat.chinayie.com"> Trade212 -> UAT </option>
        <option value="192.168.10.212_uat1.chinayie.com"> Trade212 -> UAT1 </option>
        <option value="break_line"> ****************** </option>
        <option value="uat.chinayie.com_www.chinayie.com"> UAT -> 生产 </option>
        <option value="uat1.chinayie.com_www.chinayie.com"> UAT1 -> 生产 </option>
    </select>
    <br>

    </div>
    <div id="folders1"  align="center">
         <div id="folders" >

        <table border="1" class="table table-striped table-hover table-bordered">
                <tr>
           {% for front in frontends %}
                    {% if forloop.counter0|divisibleby:"2"  %}
                        </tr><tr>
                        <td >
                          <div class="form-check">    <input name="selected_frontends"  type="checkbox" value="{{ front }}" id="{{ front }}" />
                             <label class="form-check-label" for="{{ front }}">   <strong> {{ front  }}      </strong>
                          </label></div>
                        </td>
                    {% else %}
                        <td >
                          <div class="form-check">     <input name="selected_frontends"   type="checkbox" value="{{ front }}" id="{{ front }}" />
                              <label class="form-check-label" for="{{ front }}">   <strong> {{ front  }}      </strong>
                          </label></div>
                        </td>
                     {% endif %}
            {% endfor %}
        </table>
    </div>

   <div style="width: 100px">  <button type="submit" class="btn btn-outline-primary" value="Deploy" >部署前端</button> </div>
     </div>
</form>





<script>

    $('#frontForm').submit(function(event) {

                event.preventDefault();

                $.post(
                        'deploy_frontend/',
                        $(this).serialize(), function (response) {
                            $('#details').html(response);
                        }
                )
            }
      )




    </script>

